if [[ ! -z $1 ]] && [[ -d $1 ]] && [[ -z ${unline_path} ]]
then
PREHOME=$1
elif [[ ! -z ${unline_path} ]]
then
PREHOME=${unline_path}
else
PREHOME=${HOME}"/unline"
fi
egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no
sudo apt install -y qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon
sudo adduser -a $USER libvirt
sudo adduser -a $USER libvirt-qemu
# sudo newgrp libvirt
# sudo newgrp libvirt-qemu
if [[ ! -d ${PREHOME}/minikube ]]
then
  mkdir -p ${PREHOME}/minikube
fi
if [[ ! -f $PREHOME/minikube/minikube-linux-amd64 ]]
then
curl -Lo ${PREHOME}/minikube/minikube-linux-amd64 https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
fi
sudo install ${PREHOME}/minikube/minikube-linux-amd64 /usr/local/bin/minikube
minikube version
if [[ ! -f $PREHOME/minikube/kubectl ]]
then
curl -Lo $PREHOME/minikube/kubectl "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x $PREHOME/minikube/kubectl
sudo cp -rvf  ${PREHOME}/minikube/kubectl /usr/local/bin/
fi
kubectl version --client --output=yaml
minikube start --vm-driver docker
minikebe status
